-- GENERATED SPELL FOR [Wyrmrest Protector] --


function spell0_27953(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27953', 514, 1)
end

function spell1_27953(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(17547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27953', 5270, 1)
end

function spell2_27953(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(6533,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27953', 2303, 1)
end

function spell3_27953(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(23337,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27953', 560, 1)
end

function spell4_27953(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(16145,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27953', 30347, 1)
end

function Sorts_27953(pUnit, Event)
local choix_sorts_27953 = math.random(0, 4)
if choix_sorts_27953 == 0 then
pUnit:RegisterEvent('spell0_27953', 1, 1)
end
if choix_sorts_27953 == 1 then
pUnit:RegisterEvent('spell1_27953', 1, 1)
end
if choix_sorts_27953 == 2 then
pUnit:RegisterEvent('spell2_27953', 1, 1)
end
if choix_sorts_27953 == 3 then
pUnit:RegisterEvent('spell3_27953', 1, 1)
end
if choix_sorts_27953 == 4 then
pUnit:RegisterEvent('spell4_27953', 1, 1)
end
end

function mob27953_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27953', math.random(1500, 3000), 1)
end

function mob27953_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27953_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27953_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27953, 1, 'mob27953_Action')
RegisterUnitEvent(27953, 2, 'mob27953_Leave')
RegisterUnitEvent(27953, 3, 'mob27953_Kill')
RegisterUnitEvent(27953, 4, 'mob27953_Die')
